Skip to content

[Backport to 17] Use SPV_EXT_long_vector extension for non-standard vector size,Keep VectorAnyINTEL for VectorCompute modules with SPV_EXT_long_vector#3846

Merged
YuriPlyakhin merged 2 commits into
KhronosGroup:llvm_release_170from
Qi-Ye-079:bp17-long-vector-ext
Jul 13, 2026
Merged

[Backport to 17] Use SPV_EXT_long_vector extension for non-standard vector size,Keep VectorAnyINTEL for VectorCompute modules with SPV_EXT_long_vector#3846
YuriPlyakhin merged 2 commits into
KhronosGroup:llvm_release_170from
Qi-Ye-079:bp17-long-vector-ext

Conversation

@Qi-Ye-079

Copy link
Copy Markdown
Contributor

Backport of #3777, #3829

@Qi-Ye-079 Qi-Ye-079 force-pushed the bp17-long-vector-ext branch 2 times, most recently from 1a0ab68 to 1b01d8d Compare July 13, 2026 15:01
…ector size (KhronosGroup#3777)

For a vector type, add `SPV_EXT_long_vector` extension and prioritize it
over `SPV_INTEL_vector_compute` whenever the vector type doesn't have a
standard component size (2, 3, 4, 8, or 16).
…PV_EXT_long_vector (KhronosGroup#3829)

`SPV_INTEL_vector_compute`: when both extensions are enabled and a
vector has a non-standard component count, the translator now emits
`CapabilityLongVectorEXT` instead of `CapabilityVectorAnyINTEL`.

This regresses `VectorCompute` modules. The offloading flow (producing
both `VectorCompute` and non-`VectorCompute` modules) applies a single,
fixed extension list uniformly to every device image, so a
`VectorCompute` module is translated with both
`SPV_INTEL_vector_compute` and `SPV_EXT_long_vector` enabled. Before
vectors; after KhronosGroup#3777 it emits `LongVectorEXT`. `VectorCompute` consumers
require `VectorAnyINTEL`, so this is a functional regression.

Hence, the enabled extension list does not identify a module as
`VectorCompute` - the `VectorCompute` metadata (`VCFunction`
/`VCGlobalVariable`) does. `IsVectorComputeModule` records the presence
of that metadata before type translation. `VectorCompute` modules keep
using `VectorAnyINTEL`, restoring the pre-KhronosGroup#3777 behavior; all other
modules still prefer the multi-vendor `LongVectorEXT` when its extension
is enabled.

---------

Co-authored-by: Ye, Qi <qi.ye@intel.com>
@Qi-Ye-079 Qi-Ye-079 force-pushed the bp17-long-vector-ext branch from 1b01d8d to 93931dd Compare July 13, 2026 20:36

@YuriPlyakhin YuriPlyakhin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YuriPlyakhin YuriPlyakhin merged commit 4b0665d into KhronosGroup:llvm_release_170 Jul 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants